<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AlterVoiceCallHangupTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::rename('voice_call_hangup', 'call_hangup');
        Schema::table('call_hangup', function (Blueprint $table) {
            $table->tinyInteger('call_type')->default(0)->comment('通话类型：0-语音，1-视频')->after('call_from');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('call_hangup', function (Blueprint $table) {
            //
        });
    }
}
